class CacheHistory {
    constructor (key, value) {
        this._caches = {};
        this._caches[key] = value;
    }

    has (key) {
        return this._caches.hasOwnProperty(key)
    }

    get (key) {
        return this._caches[key];
    }

    set (key, data) {
        this._caches[key] = data;
    }
}

export default class {
    constructor () {
        this._caches = {};
    }

    has (key) {
        return this._caches.hasOwnProperty(key);
    }

    get (key) {
        return this._caches[key]
    }

    set (key, offset, data) {
        this._caches[key] = new CacheHistory(offset, data);
    }
}
